<template>
    <div class="block">
        <span class="demonstration">Click 指示器触发</span>
        <el-carousel trigger="click" height="150px">
            <el-carousel-item v-for="item in imgList" :key="item">
                <img class="pic" :src="item" alt="">
            </el-carousel-item>
        </el-carousel>
    </div>
</template>

<script>
    // @ is an alias to /src
    export default {
        name: 'home',
        data() {
            return {
                imgList: [
                    "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560573916839&di=1b8c9e97887e010d130a11b631cbc7cc&imgtype=0&src=http%3A%2F%2Fimg3.duitang.com%2Fuploads%2Fitem%2F201504%2F18%2F20150418H0818_Nfj2K.jpeg",
                    "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560573990326&di=cd09b925f2ab884ef557711bdcb25f46&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201704%2F27%2F20170427003341_ZVhGe.jpeg",
                    "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560574016547&di=2465f71842a245877e825b9dd0d14389&imgtype=0&src=http%3A%2F%2Fi1.hdslb.com%2Fbfs%2Farchive%2F71c164dbf966557824f530f6756066e659931d28.jpg"
                ]
            }
        },
        methods: {}
    }
</script>

<style scoped lang="less">
    .block{
        width: 30%;
        margin: 50px auto;
    }
    .el-carousel__item h3 {
        color: #475669;
        font-size: 14px;
        opacity: 0.75;
        // line-height: 500px;
        margin: 0;
    }
    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
    }
    .el-carousel__item:nth-child(2n+1) {
        background-color: #d3dce6;
    }
    .pic{
        display: block;
        width: 100%;
        height: 100%;
    }
</style>

